fix: ignore static fields#54
Closed
Jsinco wants to merge 1 commit into
Closed
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #54 +/- ##
============================================
- Coverage 83.06% 83.02% -0.04%
Complexity 1346 1346
============================================
Files 96 96
Lines 4463 4465 +2
Branches 819 820 +1
============================================
Hits 3707 3707
- Misses 469 470 +1
- Partials 287 288 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
sandrwich
added a commit
that referenced
this pull request
Apr 27, 2026
Static fields (other than serialVersionUID, which had a name-based filter) previously leaked into config declarations because no general isStatic() filter existed. Most visibly this broke Kotlin compatibility: companion objects emit a synthetic public static final Companion field on the enclosing class, causing save() to crash with "cannot simplify type ...$Companion". Adds the missing Modifier.isStatic() check in FieldDeclaration.of and removes the now-redundant serialVersionUID name check (since it is always static). Adds a Java regression test (StaticFieldFilterTest) covering static final, static mutable, serialVersionUID, and all-static-fields cases. Adds a new core-test-kotlin module with broader Kotlin interop coverage: companion objects (including named, empty, const val, @JvmStatic), plain Kotlin classes, var/val properties, nullable types, and default value handling. Supersedes #54 (which lacked tests).
Member
|
Fixed in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ignores static fields for OkaeriConfig objects. Mainly for Kotlin compatability since we can't access
companion objectfields.As far as I'm aware, Okaeri doesn't support static fields for configs anyways so this shouldn't have any real affect